package com.ruoyi.web.controller.app.controller;

import com.ruoyi.framework.web.exception.base.XResult;
import com.ruoyi.web.controller.app.service.AppCustomerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName CustomerController
 * @Description TODO
 * @Author tyc@yanyu
 * @Date 2018/12/7 0007 10:46
 **/
@RestController
@RequestMapping("/app/customer")
@Api(tags = "用户信息获取")
public class AppCustomerController {
    @Autowired
    private AppCustomerService customerService;
    @RequestMapping(value = "getCustomerById",method = RequestMethod.POST)
    @ApiOperation(value = "获取用户信息",position = 1,notes = "获取用户信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memberId", value = "用户ID号", required = true, dataType = "String", paramType = "query"),
    })
    public XResult getCustomerById(String memberId){
        return new XResult("操作成功",customerService.queryCustomer(memberId));
    }
}
